<?php 
$this->load->view('common/head'); 
$this->load->view('common/header');
if($this->session->userdata('application_event_id')){
	$app_event_id = $this->session->userdata('application_event_id');
}
if($this->session->userdata('application_award_id')){
	$app_award_id = $this->session->userdata('application_award_id');
}
?>
<!-- Content -->
<div class="space40"></div>

<div class="container">
	<div class="row">
		<div class="col-md-12">
			<h1>Login</h1>
		</div>
	</div>
</div>

<div class="space20"></div>

<div class="container">
	<div class="row">
		<div class="center-block2">
			<?php if($this->session->userdata('activation_unsuccess')){?>
				<div class="error_msg" style="font-size:14px;"><?php echo $this->session->userdata('activation_unsuccess'); $this->session->unset_userdata('activation_unsuccess'); ?></div>
			<?php }if($this->session->userdata('activation_success')){?>
				<div class="success_msg" style="font-size:14px;"><?php echo $this->session->userdata('activation_success'); $this->session->unset_userdata('activation_success'); ?></div>
			<?php }?>
			<!--<h4>Contact Form</h4>   -->
			<!-- Form -->

			<?php echo form_open(BASE_URL.'/authenticate', array('name'=>'login_form','id'=>'login_form','autocomplete'=>'off','method'=>'post','class'=>'contact-form')); ?>

				<div class="row">
					<div class="form-group col-sm-12">
						<label for="email2">E-mail</label>
						<input  class="form-control" required id="email2" name="email"  type="text" placeholder="Email" onBlur="this.value=jQuery.trim(this.value)" value="">
						<div class="error" id="err-emailvld"></div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-12">
						<label for="password">Password</label>
						<input class="form-control" required id="password" name="password" placeholder="Password" onBlur="this.value=jQuery.trim(this.value)" type="password" value="">
						<div class="error" id="err-name"></div>
					</div>
				</div>                 

				<input type="hidden" name="app_event_id" value="<?php if(isset($app_event_id)) { echo $app_event_id; }?>">
                <input type="hidden" name="app_award_id" value="<?php if(isset($app_award_id)) { echo $app_award_id;}?>">
				<div class="row">
					<div class="col-md-12 text-center">
						<div <?php  if(isset($error) || $this->session->userdata('logout') || $this->session->userdata('login_error')){ echo 'style="display:block"';} ?> class="error error_msg">
							<?php  if(isset($error) && $error != ''){ echo $error;}else if($this->session->userdata('logout')){ echo $this->session->userdata('logout');}else if($this->session->userdata('login_error')){ echo $this->session->userdata('login_error');} ?>
						</div>
						<a href="<?php echo BASE_URL.'/forgot_password'; ?>" style="float:left;">Forgot Password?</a>
						<button type="button" class="btn2 btn-primary submit_btn" id="login_btn" style="float:right;">
							Submit
						</button>
						<div class="clearfix"></div>
					</div>
				</div>
			<?php
				$this->session->sess_destroy(); 
				echo form_close(); 
			?>
			<!-- Form End -->

		</div>

	</div>
</div>

<div class="space30"></div>

<!-- Content End -->
<?php $this->load->view('common/footer'); ?>